/*
 *  $Id: CardIdResolver.cs 1218 2010-11-28 14:03:06Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008-2010 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

using Nereal.Serialization;

namespace Ragima.Serialization {
    public sealed class CardIdResolver : IKeyResolver<string, Card> {
        public string ResolveKey(Card value) {
            return value.Id;
        }

        public Card ResolveValue(string key) {
            return CardManager.GetCard(key);
        }
    }
}
